home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
Disc to the Future 2
/
Disc to the Future Part II Programmer's Reference (Wayzata Technology)(6013)(1992).bin
/
MAC
/
HYPERCAR
/
BUTTONS_
/
COOL_BUT.TON
/
card_4114.txt
< prev
next >
Wrap
Text File
|
1988-03-23
|
2KB
|
104 lines
-- card: 4114 from stack: in.TON
-- bmap block id: 2216
-- flags: 0000
-- background id: 3537
-- name:
-- part 2 (button)
-- low flags: 00
-- high flags: A004
-- rect: left=398 top=281 right=303 bottom=499
-- title width / last selected line: 0
-- icon id / first selected line: 0 / 0
-- text alignment: 1
-- font id: 21
-- text size: 10
-- style flags: 0
-- line height: 13
-- part name: Spiral
----- HyperTalk script -----
on mouseUp
ask "what tool?" with "brush tool"
choose it
set brush to random(32)
set polysides to random(8)
domenu "select all"
domenu "clear picture"
put 250 into xcenter
put 180 into ycenter
put 100 into radius
put 50 into numbsegs
put 0 into angle
repeat until radius is 0
put xcenter + round (radius * sin (angle)) into x
put ycenter - round (radius * cos (angle)) into y
drag from xcenter,ycenter to x, y
add (2 * pi * 1 / numbsegs) to angle
subtract 1/2 from radius
subtract 1/2 from numbsegs
end repeat
end mouseUp
-- part 3 (button)
-- low flags: 00
-- high flags: A004
-- rect: left=396 top=306 right=329 bottom=497
-- title width / last selected line: 0
-- icon id / first selected line: 0 / 0
-- text alignment: 1
-- font id: 21
-- text size: 10
-- style flags: 0
-- line height: 13
-- part name: spiral shapes
----- HyperTalk script -----
on mouseUp
ask "Draw shape with what tool?" with "Regular polygon tool"
choose it
if it is "reg. polygon" then
choose regular polygon tool
set polysides to random(6) +2
end if
ask "Radius? (in pixels)" with "100"
if it is "cancel" then exit mouseup
put it into Radius
ask "Increments?" with "100"
if it is "cancel" then exit mouseup
put it into numbsegs
ask "Rate?" with "2"
if it is "cancel" then exit mouseup
put it into rate
domenu "select all"
domenu "clear picture"
--set centered to true
--set grid to false
put 250 into xcenter
put 180 into ycenter
put 0 into angle
repeat until radius is 0
put xcenter + round (radius * sin (angle)) into x
put ycenter - round (radius * cos (angle)) into y
drag from xcenter,ycenter to x, y
add (rate * pi * 1 / numbsegs) to angle
subtract 2 from radius
end repeat
choose browse tool
end mouseUp